<!doctype html>
<html>
<head>
    <meta charset="utf-8"/>
    <!-- 		<meta http-equiv="refresh" content="0;url=xindex.html" /> -->
    <title>leGo-乐鲜生活-店铺</title>
    <script src="https://cdn.bootcss.com/headroom/0.9.4/angular.headroom.js"></script>

    <style type="text/css">
        body {
            margin: 0;
            padding: 0;
        }

        /*a标签中使用img后的高度多了4px*/
        /*由于img是行内元素，默认display: inline; 它与文本的默认行为类似，下边缘是与基线（baseline）对齐，而不是紧贴容器下边缘。*/
        img {
            display: block;
        }

        a {
            margin: 0;
            display: block;
            text-decoration: none;
        }

        ul {
            padding: 0;
            list-style-type: none;
        }

        p {
            font-size: 12px;
            color: black;
            margin: 0;
            padding: 0;
        }

        h2, h3 {
            margin: 0;
        }

        /* Start 图片hove改变滤镜*/
        .home-page-img-item {
            cursor: pointer;
            -webkit-filter: brightness(100%); /* Chrome, Safari, Opera */
            filter: brightness(100%);
        }

        .home-page-img-item:hover {
            -webkit-filter: brightness(110%); /* Chrome, Safari, Opera */
            filter: brightness(110%);
        }

        /* End 图片hove改变滤镜*/

        /* Start 首页头部*/
        .head-logo {
            height: 140px;
        }

        .head-inner {
            position: relative;
            width: 1000px;
            height: 140px;
            margin: 0 auto;

        }

        .header-logo {
            position: absolute;
            left: 0;
            top: 30px;
            height: 80px;
        }

        .header-search {
            width: 340px;
            height: 32px;
            border: none;
            float: right;
            margin-top: 53px;
            display: inline;
        }

        .search-form {
            position: relative;
            width: 338px;
            height: 32px;
            border-radius: 3px;
            border: 1px solid black;
        }

        .header-search-input {
            padding: 2px 15px;
            width: 261px;
            height: 28px;
            line-height: 30px;
            font-size: 14px;
            color: #333;
            border: none;
            outline: none;
            border-radius: 3px;
            display: inline-block;
        }

        .header-search-button {
            position: absolute;
            top: 0;
            right: 0;
            width: 47px;
            height: 24px;
            padding-top: 8px;
            text-align: center;
            display: inline-block;
        }

        .header-search-icon {
            width: 17px;
            height: 17px;
            background-image: url("images/search.png");
            display: inline-block;

        }

        .buyCar {
            float: right;
            width: 106px;
            height: 34px;
            margin-top: 53px;
            margin-left: 20px;
        }

        .shopping-bag-icon {
            width: 33px;
            height: 33px;
            background-image: url("images/shopping-car.png");
            display: inline-block;
        }

        /* End 首页头部*/
        /* Start 导航*/
        .header-nav {
            width: 100%;
            height: 40px;
            background-color: #26394b;
        }

        .first-category {
            width: 1150px;
            height: 40px;
            margin: 0 auto;
        }

        .first-category-ul {
            height: 40px;
            margin: 0 auto;
            padding-left: 0;
        }

        .first-category-item {
            width: 92px;
            height: 40px;
            font-size: 15px;
            text-align: center;
            line-height: 40px;
            list-style-type: none;
            float: left;
            padding: 0 auto;
            background-color: #26394b;
            color: white;
            cursor: pointer;

        }

        .first-category-item:hover {
            background-color: #2f5e8d;
            text-decoration: solid;
        }

        .first-last-category {
            margin-right: 0;
        }

        /* End 导航*/
        /* Start 主页面内容 */
        .home-page {
            width: 1150px;
            margin: 10px auto 0;
        }

        /* Start 侧边栏*/
        .side-bar {
            float: left;
            width: 160px;
            font-size: 14px;
        }

        .product-list-nav h3 {
            font-size: 14px;
        }

        .product-list-nav h3:hover {
            cursor: pointer;
        }

        .sort-child-list {
            padding-left: 10px;
            height: 1px;
            overflow: hidden;
            /*display: none;*/
        }

        .sort-child-list li {
            padding-top: 8px;
        }

        .sort-child-list li:nth-child(1) {
            padding-top: 0;
        }

        .sort-child-list li a {
            color: grey;
            font-size: 12px;
        }

        .icon-triangle {
            display: inline-block;
            padding-left: 0;
            width: 0;
            height: 0;
            border-top: 6px solid #fff;
            border-left: 6px solid #000;
            border-bottom: 6px solid #fff;
            position: absolute;
            top: 50%;
            margin-top: -6px;
            left: 0;
            transition: transform .3s;
        }

        .product-list-nav h3, .product-list-nav h2 a {
            font-size: 14px;
            margin-bottom: 8px;
            height: 28px;
            line-height: 28px;
            font-weight: 700;
            position: relative;
            text-indent: 10px;
            color: #000;
        }

        .product-list-nav h2 a {
            text-indent: 0px;
        }

        .product-list-nav h3 span {
            position: absolute;
            top: 50%;
        }

        .product-list-nav.active .icon-triangle {
            transform: rotate(90deg);
        }

        /* Start 显示内容*/
        .home-main {
            width: 970px;
            float: right;
        }

        .res-content {
            float: left;
            margin-left: 8px;
            margin-top: -8px;
        }

        .store-image {
            width: 1150px;
            height: 150px;
            background-image: url("images/store/1.jpg");
        }

        /* End 显示内容*/

    </style>

</head>
<body>
<!--首页-->
<div class="head-logo">
    <div class="head-inner">
        <!--logo-->
        <div class="header-logo">
            <a href="index.html"><img src="images/logo.png" alt="乐鲜生活" height="80"/></a>
        </div>
        <!--购物车-->
        <div class="buyCar">
            <a href="buy-cart.html">
                <span class="shopping-bag-icon"></span>
            </a>
        </div>
        <div class="head-intro"></div>
        <div class="home-page">
            <div class="store-image">

            </div>
            <!--侧边栏-->
            <div class="side-bar">
                <div class="sort-container">
                    <ul>
                        <li class="product-list-nav">
                            <h2>
                                <a href="#">全部分类</a>
                            </h2>
                            <hr/>
                        </li>


                        <li class="product-list-nav" v-for="(item, index) in categoryTree">
                            <h3 @click="popupSidebar(index)">
                                <span class="icon-triangle"></span>{{item.primaryCategory.name}}</h3>
                            <ul class="sort-child-list">
                                <li v-for="(sub_item,sub_index) in item.secondCategory">
                                    <a style="cursor: pointer;" @click="onSideBarSubCateClick(index,sub_index)">{{sub_item.name}}</a>
                                </li>

                            </ul>
                        </li>
                    </ul>
                </div>
            </div>

            <!--瀑布流布局显示图片-->
            <div class="home-main">

                <template v-for="(item,index) in currentGoodsToDisplay">
                    <ul class="res-content" v-if="index%4==0">
                        <li style="margin-top: 8px;">
                            <div>
                                <a href="pro-detail.html"
                                   style="height: 280px;width: 222px;display: flex;flex-flow: column nowrap; justify-content: center">
                                    <img :src="item.image_main" class="home-page-img-item" width="222">
                                </a>
                                <a href="www.yohobuy.com/product/51907864.html"
                                   style="color: black; font-size: 12px; display: block; text-decoration: none; margin-top: 8px;">{{item.goods_name}}</a>
                                <p>{{item.store_name}}</p>
                                <p>￥{{item.price}}</p>
                            </div>
                        </li>
                    </ul>
                    <ul class="res-content" v-else-if="index%4==1">
                        <li style="margin-top: 8px;">
                            <div>
                                <div>
                                    <a href="pro-detail.html"
                                       style="height: 280px;width: 222px;display: flex;flex-flow: column nowrap; justify-content: center">
                                        <img :src="item.image_main" class="home-page-img-item" width="222">
                                    </a>
                                    <a href="www.yohobuy.com/product/51907864.html"
                                       style="color: black; font-size: 12px; display: block; text-decoration: none; margin-top: 8px;">{{item.goods_name}}</a>
                                    <p>{{item.store_name}}</p>
                                    <p>￥{{item.price}}</p>
                                </div>
                            </div>
                        </li>
                    </ul>
                    <ul class="res-content" v-else-if="index%4==2">
                        <li style="margin-top: 8px;">
                            <div>
                                <div>
                                    <a href="pro-detail.html"
                                       style="height: 280px;width: 222px;display: flex;flex-flow: column nowrap; justify-content: center">
                                        <img :src="item.image_main" class="home-page-img-item" width="222">
                                    </a>
                                    <a href="www.yohobuy.com/product/51907864.html"
                                       style="color: black; font-size: 12px; display: block; text-decoration: none; margin-top: 8px;">{{item.goods_name}}</a>
                                    <p>{{item.store_name}}</p>
                                    <p>￥{{item.price}}</p>
                                </div>
                            </div>
                        </li>
                    </ul>
                    <ul class="res-content" v-else-if="index%4==3">
                        <li style="margin-top: 8px;">
                            <div>
                                <div>
                                    <a href="pro-detail.html"
                                       style="height: 280px;width: 222px;display: flex;flex-flow: column nowrap; justify-content: center">
                                        <img :src="item.image_main" class="home-page-img-item" width="222">
                                    </a>
                                    <a href="www.yohobuy.com/product/51907864.html"
                                       style="color: black; font-size: 12px; display: block; text-decoration: none; margin-top: 8px;">{{item.goods_name}}</a>
                                    <p>{{item.store_name}}</p>
                                    <p>￥{{item.price}}</p>
                                </div>
                            </div>
                        </li>
                    </ul>
                    <!-- <ul class="res-content" v-else-if="index%4==3"></ul> -->

                </template>

            </div>
        </div>
    </div>
</div>
<div class="header-nav">
    <div class="first-category">
        <ul class="first-category-ul">
            <li class="first-category-item">
                <span>学习装备</span>
            </li>
            <li class="first-category-item">
                <span>膳食营养</span>
            </li>
            <li class="first-category-item">
                <span>教育培训</span>
            </li>
            <li class="first-category-item">
                <span>健康五谷</span>
            </li>
            <li class="first-category-item">
                <span>精致生活</span>
            </li>
            <li class="first-category-item">
                <span>家居保卫</span>
            </li>
            <li class="first-category-item">
                <span>校园文化</span>
            </li>
            <li class="first-category-item first-last-category">
                <span>天天特价</span>
            </li>
        </ul>
    </div>
</div>
<div class="head-intro"></div>
<div class="home-page">
    <div class="store-image">
        <script src="js/storePage.js"></script>
</body>

